<div id="categoriesAccueilDiv"></div>
<div id="listeMeilleuresVenteRevesAccueilDiv"></div>

<script id="categoriesAccueilTemplate" type="text/x-jsrender">
<dl class="sub-nav">
  <dt>Meilleures ventes :</dt>
  {^{for categories}}
  {^{if selected}}
  <dd class="active">
        <a href="javascript:;"
            categorie="{{:idCategorieReve}}"
            class="selectCategorie">
            {{:libelle}}
        </a></dd>
  {{else}}
  <dd>
        <a href="javascript:;"
            categorie="{{:idCategorieReve}}"
            class="selectCategorie">
            {{:libelle}}
        </a></dd>
  {{/if}}
  {{/for}}
</dl>

</script>

<script id="listeMeilleuresVenteRevesAccueilTemplate" type="text/x-jsrender">
    {{for reves}}
        <div class="reveMeilleuresVentesAccueil">
            <div class="row">
                <div class="large-3 columns">
                    <a href="reve.dream?reve={{:idReve}}">
                        <img class="imgReve"
                         src="img/reves/{{:image}}"/>
                    </a>
                </div>
                <div class="large-7 columns">
                    <a href="reve.dream?reve={{:idReve}}">
                        <h4 class="nom">{{:nom}}</h5><br/>
                    </a>
                    <span class="prix">{{:prix}}€</span><br/>
                    {{for categorieRevesDTO}}
                      <span class="type">{{:libelle}}</span>
                    {{/for}}
                </div>
                <div class="large-2 columns">
                    <a href="reve.dream?reve={{:idReve}}"
                            class="button radius">
                            Voir
                    </a>
                </div>
            </div>
        </div>
    {{/for}}
</script>

<script type="application/javascript">
    require(["jquery"], function () {
        $(document).ready(function () {
            require(["projetDreamAccueil"], function () {
                projetDreamAccueil.initAccueil();
            });
        });
    });
</script>
